<!--
 * @Author: chenl
 * @Date: 2023-12-05 15:31:24
 * @LastEditors: chenl
 * @LastEditTime: 2023-12-05 15:39:09
 * @Description: 全局布局标签
-->
<template>
  <div>
    <slot v-if="isEmpty"></slot>
    <el-empty :image="emptyImg" :image-size="300" v-else></el-empty>
  </div>
</template>

<script>
export default {
  props: {
    dataSource: {
      type: Array,
      default: () => [],
    },
  },
  computed: {
    isEmpty() {
      return this.dataSource.length;
    },
  },
  data() {
    return {
      emptyImg: require('@/assets/imgs/common/no-data.png'),
    };
  },
  mounted() {},
};
</script>

<style></style>
